package STUDENT.DAODUCGIANG.OOPs.BaiTap2;

public class Models {
	public double Cal(Number num){
	double KetQua = 0;
	switch (num.getPhepTinh()){
		case 0: KetQua = num.getA() + num.getB();
		break;
		case 1: KetQua = num.getA() - num.getB();
		break;
		case 2: KetQua = num.getA() * num.getB();
		break;
		case 3: KetQua = num.getA() / num.getB();
		break;
	}
	return KetQua;
	
}
}